YES 1.395
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/Monad.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule Monad
| ((replicateM :: Monad a => Int -> a b -> a [b]) :: Monad a => Int -> a b -> a [b]) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM :: Monad a => Int -> a b -> a [b]
replicateM | n x | = | sequence (replicate n x) |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Lambda Reductions:
The following Lambda expression
\xs→return (x : xs)
is transformed to
sequence0 | x xs | = return (x : xs) |
The following Lambda expression
\x→sequence cs >>= sequence0 x
is transformed to
sequence1 | cs x | = sequence cs >>= sequence0 x |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
mainModule Monad
| ((replicateM :: Monad b => Int -> b a -> b [a]) :: Monad b => Int -> b a -> b [a]) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM :: Monad b => Int -> b a -> b [a]
replicateM | n x | = | sequence (replicate n x) |
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule Monad
| ((replicateM :: Monad b => Int -> b a -> b [a]) :: Monad b => Int -> b a -> b [a]) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM :: Monad b => Int -> b a -> b [a]
replicateM | n x | = | sequence (replicate n x) |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
The following Function with conditions
take | n vx | |
take | vy [] | = [] |
take | n (x : xs) | = x : take (n - 1) xs |
is transformed to
take | n vx | = take3 n vx |
take | vy [] | = take1 vy [] |
take | n (x : xs) | = take0 n (x : xs) |
take0 | n (x : xs) | = x : take (n - 1) xs |
take1 | vy [] | = [] |
take1 | ww wx | = take0 ww wx |
take2 | n vx True | = [] |
take2 | n vx False | = take1 n vx |
take3 | n vx | = take2 n vx (n <= 0) |
take3 | wy wz | = take1 wy wz |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
mainModule Monad
| ((replicateM :: Monad a => Int -> a b -> a [b]) :: Monad a => Int -> a b -> a [b]) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM :: Monad b => Int -> b a -> b [a]
replicateM | n x | = | sequence (replicate n x) |
|
Let/Where Reductions:
The bindings of the following Let/Where expression
are unpacked to the following functions on top level
repeatXs | xu | = xu : repeatXs xu |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
mainModule Monad
| ((replicateM :: Monad b => Int -> b a -> b [a]) :: Monad b => Int -> b a -> b [a]) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM :: Monad b => Int -> b a -> b [a]
replicateM | n x | = | sequence (replicate n x) |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Num Reduction: All numbers are transformed to thier corresponding representation with Pos, Neg, Succ and Zero.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
mainModule Monad
| (replicateM :: Monad a => Int -> a b -> a [b]) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM :: Monad a => Int -> a b -> a [b]
replicateM | n x | = | sequence (replicate n x) |
|
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs(:(xv140, xv141), xv11, h) → new_psPs(xv141, xv11, h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs(:(xv140, xv141), xv11, h) → new_psPs(xv141, xv11, h)
The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_gtGtEs(:(xv1310, xv1311), xv410, h) → new_gtGtEs(xv1311, xv410, h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_gtGtEs(:(xv1310, xv1311), xv410, h) → new_gtGtEs(xv1311, xv410, h)
The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
new_sequence0(Succ(xv3000), Just(xv40), ty_Maybe, h) → new_sequence0(xv3000, Just(xv40), ty_Maybe, h)
new_sequence0(xv300, :(xv40, xv41), ty_[], h) → new_gtGtEs0(xv41, xv300, xv40, xv41, h)
new_gtGtEs0(:(xv210, xv211), xv22, xv23, xv24, ba) → new_sequence(xv22, xv23, xv24, ba)
new_sequence0(Succ(xv3000), :(xv40, xv41), ty_[], h) → new_sequence0(xv3000, :(xv40, xv41), ty_[], h)
new_gtGtEs0(:(xv210, xv211), xv22, xv23, xv24, ba) → new_gtGtEs0(xv211, xv22, xv23, xv24, ba)
new_sequence1(Succ(xv3000), xv4, xv5, h) → new_sequence0(xv3000, xv4, ty_IO, h)
new_sequence(Succ(xv3000), xv40, xv41, h) → new_sequence0(xv3000, :(xv40, xv41), ty_[], h)
new_sequence0(Succ(xv3000), xv4, ty_IO, h) → new_sequence0(xv3000, xv4, ty_IO, h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs with 1 less node.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_sequence0(Succ(xv3000), xv4, ty_IO, h) → new_sequence0(xv3000, xv4, ty_IO, h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_sequence0(Succ(xv3000), xv4, ty_IO, h) → new_sequence0(xv3000, xv4, ty_IO, h)
The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3, 4 >= 4
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_sequence0(xv300, :(xv40, xv41), ty_[], h) → new_gtGtEs0(xv41, xv300, xv40, xv41, h)
new_gtGtEs0(:(xv210, xv211), xv22, xv23, xv24, ba) → new_sequence(xv22, xv23, xv24, ba)
new_sequence0(Succ(xv3000), :(xv40, xv41), ty_[], h) → new_sequence0(xv3000, :(xv40, xv41), ty_[], h)
new_gtGtEs0(:(xv210, xv211), xv22, xv23, xv24, ba) → new_gtGtEs0(xv211, xv22, xv23, xv24, ba)
new_sequence(Succ(xv3000), xv40, xv41, h) → new_sequence0(xv3000, :(xv40, xv41), ty_[], h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_sequence(Succ(xv3000), xv40, xv41, h) → new_sequence0(xv3000, :(xv40, xv41), ty_[], h)
The graph contains the following edges 1 > 1, 4 >= 4
- new_sequence0(xv300, :(xv40, xv41), ty_[], h) → new_gtGtEs0(xv41, xv300, xv40, xv41, h)
The graph contains the following edges 2 > 1, 1 >= 2, 2 > 3, 2 > 4, 4 >= 5
- new_gtGtEs0(:(xv210, xv211), xv22, xv23, xv24, ba) → new_gtGtEs0(xv211, xv22, xv23, xv24, ba)
The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3, 4 >= 4, 5 >= 5
- new_sequence0(Succ(xv3000), :(xv40, xv41), ty_[], h) → new_sequence0(xv3000, :(xv40, xv41), ty_[], h)
The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3, 4 >= 4
- new_gtGtEs0(:(xv210, xv211), xv22, xv23, xv24, ba) → new_sequence(xv22, xv23, xv24, ba)
The graph contains the following edges 2 >= 1, 3 >= 2, 4 >= 3, 5 >= 4
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_sequence0(Succ(xv3000), Just(xv40), ty_Maybe, h) → new_sequence0(xv3000, Just(xv40), ty_Maybe, h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_sequence0(Succ(xv3000), Just(xv40), ty_Maybe, h) → new_sequence0(xv3000, Just(xv40), ty_Maybe, h)
The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3, 4 >= 4